package com.aaxis.microservice.training.demo1.message;

import org.apache.kafka.common.serialization.Serializer;
import org.springframework.util.SerializationUtils;

import java.util.Map;

/**
 * Created by terrence on 2018/10/22.
 */
public class ObjectSerializer implements Serializer<Object> {

    @Override
    public void configure(Map<String, ?> configs, boolean isKey) {

    }



    @Override
    public byte[] serialize(String topic, Object data) {
        return SerializationUtils.serialize(data);
    }



    @Override
    public void close() {

    }
}